/*
 * @Descripttion: 
 * @version: 
 * @Author: cyj
 * @Date: 2023-01-31 17:42:50
 */
import request from '@/utils/request'


//获取热门视频分类标签
export const getHotVideoTag = (cookie) => request({
    url: '/video/category/list',
    params: {
        timestamp: Date.parse(new Date()),
        cookie
    }
})

//获取全部视频标签
export const getAllVideoTag = () => request({
    url: '/video/group/list'
})

//获取视频播放地址url
export const getVideoUrl = (id) => request({
    url: '/video/url',
    params: {
        id
    }
})

//获取视频详情
export const getVideoDetail = (id) => request({
    url: '/video/detail',
    params: {
        id
    }
})

//获取分类视频列表
export const getGroupVideoList = (id, offset, cookie) => request({
    url: '/video/group',
    params: {
        id,
        offset,
        cookie
    }
})

//获取推荐视频
export const getVideoCommend = (offset, cookie) => request({
    url: '/video/timeline/recommend',
    params: {
        offset, cookie
    }
})

//获取视频点赞转发评论数据
export const getVideoDetails = (vid) => request({
    url: '/video/detail/info',
    params: {
        vid
    }
})

//获取相关视频
export const getSimVideo = (id) => request({
    url: '/related/allvideo',
    params: {
        id
    }
})


//获取全部mv列表
export const getAllMv = (area, type, order, limit, offset) => request({
    url: '/mv/all',
    method: 'GET',
    params: {
        area,
        type,
        order,
        limit,
        offset
    }
})

//获取mv详细数据
export const getMvDetail = (mvid) => request({
    url: `/mv/detail`,
    method: 'GET',
    params: {
        mvid
    }
})

//获取mv的播放地址
export const getMvUrl = (id) => request({
    url: `/mv/url`,
    method: 'GET',
    params: {
        id
    }
})

//获取相似mv
export const getSimiMv = (mvid) => request({
    url: `/simi/mv`,
    method: 'GET',
    params: {
        mvid
    }
})

//收藏、取消收藏mv   t : 1 为收藏,其他为取消收藏
export const subMv = (mvid, t) => request({
    url: '/mv/sub',
    method: 'GET',
    params: {
        mvid,
        t,
        timestamp: Date.parse(new Date()),
    }
})

//获取mv点赞转发评论数据
export const getMvData = (mvid) => request({
    url: '/mv/detail/info',
    method: 'GET',
    params: {
        mvid
    }
})


